package com.adams.custom.page.mgt.service;

import java.util.List;
import java.util.Map;

import com.adams.access.db.bean.ViewEvent;
import com.adams.access.db.bean.ViewItem;
import com.adams.access.db.bean.ViewPanel;
import com.adams.access.db.bean.ViewPanelFilter;
import com.adams.access.db.bean.ViewWin;
import com.adams.core.exception.BusinessException;

/**
 * 
 * File Name : ViewCfgService.java
 * 
 * @Description : 界面定义服务接口
 */
public interface ViewCfgService
{

	/**
	 * Description : 根据菜单id得到ViewWin列表
	 * 
	 * @param menuid
	 * @return
	 * @throws BusinessException
	 * 
	 */
	public List<ViewWin> findViewWinByMenuid(Long menuid)
			throws BusinessException;

	/**
	 * Description : 根据菜单id及窗口类型得到ViewWin列表
	 * 
	 * @param menuid
	 * @return
	 * @throws BusinessException
	 * 
	 */
	public List<ViewWin> findViewWinByMenuidAndWintype(Long menuid,
			String wintype) throws BusinessException;

	/**
	 * Description : 根据界面内容项id及窗口类型得到ViewWin列表
	 * 
	 * @param viewpanelidStr
	 * @param wintype
	 * @return
	 * @throws BusinessException
	 * 
	 */
	public List<ViewWin> findViewWinByViewPanelIdAndWintype(
			String viewpanelidStr, String wintype) throws BusinessException;

	/**
	 * Description : 新增或者更新界面窗口
	 * 
	 * @param viewWin
	 * @throws BusinessException
	 * 
	 */
	public void saveOrUpdateViewWin(ViewWin viewWin) throws BusinessException;

	/**
	 * Description : 删除界面窗口
	 * 
	 * @param viewWin
	 * @throws BusinessException
	 * 
	 */
	public void deleteViewWins(List<Long> viewwinids) throws BusinessException;

	/**
	 * Description : 根据页面窗口id得到ViewPanel列表
	 * 
	 * @param viewwinid
	 * @throws BusinessException
	 * 
	 */
	public List<ViewPanel> findViewPanelByViewwinid(Long viewwinid)
			throws BusinessException;

	/**
	 * Description : 根据id得到ViewPanel对象
	 * 
	 * @param id
	 * @return
	 * @throws BusinessException
	 * 
	 */
	public ViewPanel getViewPanelById(Long id) throws BusinessException;

	/**
	 * Description : 新增或者更新界面面板
	 * 
	 * @param viewPanel
	 * @throws BusinessException
	 * 
	 */
	public void saveOrUpdateViewPanel(ViewPanel viewPanel)
			throws BusinessException;

	/**
	 * Description : 删除界面面板
	 * 
	 * @param viewPanel
	 * @throws BusinessException
	 * 
	 */
	public void deleteViewPanels(List<Long> viewPanelids)
			throws BusinessException;

	/**
	 * Description : 根据面板id得到ViewItem列表
	 * 
	 * @param viewpanelid
	 * @return
	 * @throws BusinessException
	 * 
	 */
	public List<ViewItem> findViewItemByViewpanelid(Long viewpanelid)
			throws BusinessException;

	/**
	 * Description : 根据id得到ViewItem对象
	 * 
	 * @param id
	 * @return
	 * @throws BusinessException
	 * 
	 */
	public ViewItem getViewItemById(Long id) throws BusinessException;

	/**
	 * Description : 新增或者更新界面内容项
	 * 
	 * @param viewItem
	 * @throws BusinessException
	 * 
	 */
	public void saveOrUpdateViewItem(ViewItem viewItem)
			throws BusinessException;

	/**
	 * Description : 删除界面内容项
	 * 
	 * @param viewItem
	 * @throws BusinessException
	 * 
	 */
	public void deleteViewItems(List<Long> viewItemids)
			throws BusinessException;

	/**
	 * Description : 根据面板id得到ViewEvent列表
	 * 
	 * @param viewpanelid
	 * @return
	 * 
	 */
	public List<ViewEvent> findViewEventByViewpanelid(Long viewpanelid)
			throws BusinessException;

	/**
	 * Description : 根据id得到ViewEvent对象
	 * 
	 * @param id
	 * @return
	 * @throws BusinessException
	 * 
	 */
	public ViewEvent getViewEventById(Long id) throws BusinessException;

	/**
	 * Description : 新增或者更新界面事件
	 * 
	 * @param viewEvent
	 * @throws BusinessException
	 * 
	 */
	public void saveOrUpdateViewEvent(ViewEvent viewEvent)
			throws BusinessException;

	/**
	 * Description : 删除界面事件
	 * 
	 * @param viewEvent
	 * @throws BusinessException
	 * 
	 */
	public void deleteViewEvents(List<Long> viewEventids)
			throws BusinessException;

	/**
	 * Description : 获得界面内容项列选择树
	 * 
	 * @param tablecode
	 * @return
	 * @throws BusinessException
	 * 
	 */
	@SuppressWarnings("unchecked")
	public List<Map> getParseColumnCodeTree(String tablecode)
			throws BusinessException;

	/**
	 * Description : 根据id得到ViewPanelFilter对象
	 * 
	 * @param id
	 * @return
	 * @throws BusinessException
	 * 
	 */
	public ViewPanelFilter getViewPanelFilterById(Long id)
			throws BusinessException;

	/**
	 * Description : 根据面板id得到ViewPanelFilter列表
	 * 
	 * @param viewpanelidStr
	 * @return
	 * 
	 */
	public List<ViewPanelFilter> findViewPanelFilterByViewpanelid(
			String viewpanelidStr) throws BusinessException;

	/**
	 * Description : 新增或者更新界面面板自定义过滤条件对象
	 * 
	 * @param viewPanelFilter
	 * @throws BusinessException
	 * 
	 */
	public void saveOrUpdateViewPanelFilter(ViewPanelFilter viewPanelFilter)
			throws BusinessException;

	/**
	 * Description : 删除界面面板自定义过滤条件对象
	 * 
	 * @param viewPanelFilterids
	 * @throws BusinessException
	 * 
	 */
	public void deleteViewPanelFilters(List<Long> viewPanelFilterids)
			throws BusinessException;

	/**
	 * Description : 缓存同步
	 * 
	 * @throws BusinessException
	 * 
	 */
	public void synchronizationCache() throws BusinessException;
}